//
//  TimeCell.m
//  Food
//
//  Created by dlios on 15/7/17.
//  Copyright (c) 2015年 李志远. All rights reserved.
//

#import "TimeCell.h"
#import "UIImageView+WebCache.h"
@implementation TimeCell

- (void)dealloc
{
    [super dealloc];
    [_img release];
    [_title release];
    [_content release];
    [_model release];
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.img = [[UIImageView alloc] init];
        [self.contentView addSubview:self.img];
        
        self.title = [[UILabel alloc] init];
        self.title.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:self.title];
        
        self.content = [[UILabel alloc] init];
        self.content.font = [UIFont systemFontOfSize:13];
        self.content.textColor = [UIColor grayColor];
        [self.contentView addSubview:self.content];
        
    }
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    self.img.frame = CGRectMake(10, 10, 40, 40);
    self.title.frame = CGRectMake(60, 10, 150, 20);
    self.content.frame = CGRectMake(60, 30, 200, 20);
    
}

- (void)setModel:(HealthObject *)model
{
    if (_model != model) {
        [_model release];
        _model = [model retain];
    }
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
